For example, JP2007-155399A describes a current sensor that includes a bias magnet generating a bias magnetic field and a magnetic sensor having a magnetoresistive element whose resistance value changes according to a magnetic field applied thereto.
Such a current sensor is arranged relative to a current path, such as a bus bar, such that a direction of the bias magnetic field is parallel to a direction of an electric current flowing in the current path to detect the electric current (hereinafter also referred to as the detection current). As the detection current flows in the current path, a current magnetic field is generated in a direction perpendicular to the bias magnetic field. The current magnetic field is proportional to a magnitude of the detection current. As such, the current sensor is applied with a synthetic magnetic field composed of the bias magnetic field and the current magnetic field. Since the resistance value of the magnetoresistive element changes according to the synthetic magnetic field, the current sensor outputs a sensor signal according to the synthetic magnetic field.
As examples of the magnetoresistive element, generally, an anisotropic magnetoresistive (AMR) element, a giant magnetoresistive (GMR) element, and a tunnel magnetoresistive (TMR) element are known. With regard to the anisotropic magnetoresistive element, a resistance value changes in the form of second harmonic of a sine wave or second harmonic of a cosine wave according to an angle of the synthetic magnetic field applied thereto. With regard to the giant magnetoresistive element and the tunnel magnetoresistive element, a resistance value changes in the form of a sine wave or a cosine wave according to an angle of the synthetic magnetic field applied thereto. Therefore, a current sensor having these magnetoresistive elements outputs a sensor signal containing a sine value or a sensor signal containing a cosine value.
However, the sensor signal containing the sine value and the signal the cosine value according to the angle of synthetic magnetic field are not outputted linearly with respect to the detection current. Therefore, detection accuracy varies according to the detection current. In other words, in an area where linearity of the sensor signal outputted is high, the detection accuracy is high. However, in an area where the linearity of the sensor signal outputted is low, the detection accuracy is low. Here, the linearity of the sensor signal outputted, that is, linear output means output in which the detection current and the sensor signal (voltage) have a proportional relationship with respect to each other.